import { request } from '@/utils/request.js'

// 直播间列表
export default {
  /**
   * 获取直播间分页列表
   * @returns
   */
  getPageList(params = {}) {
    return request({
      url: '/admin/room/listRoom',
      method: 'post',
      data:params
    })
  },

  /**
   * 新增直播间
   * @param {*} data
   * @returns
   */
  addRoom(data) {
    return request({
      url: '/admin/room/addRoom',
      method: 'post',
      data
    })
  },
  /**
   * 更新直播间
   * @param {*} data
   * @returns
   */
  updateRoom(data) {
    return request({
      url: '/admin/room/editRoom',
      method: 'post',
      data
    })
  },
  /**
   * 删除直播间
   * @param {*} data
   * @returns
   */
  deleteRoom(data) {
    return request({
      url: '/admin/room/removeRoom',
      method: 'post',
      data
    })
  },
  /**
   * 获取直播间详情
   * @param {*} data
   * @returns
   */
  RoomDetail(data) {
    return request({
      url: '/admin/room/detailRoom',
      method: 'post',
      data
    })
  },
  /**
   * 批量复制直播间
   * @param {*} data
   * @returns
   */
  copyRoom(data) {
    return request({
      url: '/admin/room/copyRoom',
      method: 'post',
      data
    })
  },
  /**
   * 新增视频
   * @param {*} data
   * @returns
   */
  addVideo(data) {
    return request({
      url: '/admin/video/infoVideo',
      method: 'post',
      data
    })
  },
  /**
   * 视频库列表
   * @returns
   */
  listVideo(data) {
    return request({
      url: '/admin/video/listVideo',
      method: 'post',
      data
    })
  },
  /**
   * 获取视频上传token
   * @returns
   */
  getVideoToken() {
    return request({
      url: '/admin/video/infoVideo',
      method: 'post',
    })
  },
  /**
   * 删除视频
   * @returns
   */
  removeVideo(data) {
    return request({
      url: '/admin/video/removeVideo',
      method: 'post',
      data
    })
  },
  // 视频预览地址
  getVideoPreview(data) {
    return request({
      url: '/admin/video/previewVideoUrl',
      method: 'post',
      data
    })
  },
  // 编辑视频信息
  editVideo(data) {
    return request({
      url: '/admin/video/editVideo',
      method: 'post',
      data
    })
  },
  // 获取视频清晰度
  videoDefinition(data) {
    return request({
      url: '/admin/room/videoQualityInfo',
      method: 'post',
      data
    })
  },
  // 创建定时直播
  createTimedLive(data) {
    return request({
      url: '/admin/room/recordRoom',
      method: 'post',
      data
    })
  },
  // 屏蔽词列表
  BlockWordList(data) {
    return request({
      url: '/admin/mask/listMask',
      method: 'post',
      data
    })
  },
  // 新增屏蔽词
  addBlockWord(data) {
    return request({
      url: '/admin/mask/addMask',
      method: 'post',
      data
    })
  },
  // 删除屏蔽词
  deleteBlockWord(data) {
    return request({
      url: '/admin/mask/removeMask',
      method: 'post',
      data
    })
  },
  // 编辑屏蔽词
  editBlockWord(data) {
    return request({
      url: '/admin/mask/editMask',
      method: 'post',
      data
    })
  },
  // 设置回放
  setPlayBack(data) {
    return request({
      url: '/admin/room/playbackSet',
      method: 'post',
      data
    })
  },
  // 获取回放设置
  getPlayBack(data) {
    return request({
      url: '/admin/room/playbackDetail',
      method: 'post',
      data
    })
  },
  // 数据大屏嵌入地址
  dataTotal(data) {
    return request({
      url: '/admin/room/dataTotal',
      method: 'post',
      data
    })
  },
  // 当前流量剩余
  flowRate(data) {
    return request({
      url: '/admin/room/flowRate',
      method: 'post',
      data
    })
  },
  // 直播间流量
  volumeList(data) {
    return request({
      url: '/admin/volume/volumeList',
      method: 'post',
      data
    })
  },
  // 奖励列表
  rewardList(data) {
    return request({
      url: '/admin/rewardRoom/basicsConfigList',
      method: 'post',
      data
    })
  },
  // 新增奖励
  addReward(data) {
    return request({
      url: '/admin/rewardRoom/addBasicsConfig',
      method: 'post',
      data
    })
  },
  // 更新奖励
  updateReward(data) {
    return request({
      url: '/admin/rewardRoom/editBasicsConfig',
      method: 'post',
      data
    })
  },
  // 删除奖励
  deleteReward(data) {
    return request({
      url: '/admin/rewardRoom/delBasicsConfig',
      method: 'post',
      data
    })
  },
  // 声网直播列表
  swlistRoom(data) {
    return request({
      url: '/admin/ease/room/listRoom',
      method: 'post',
      data
    })
  },
  // 创建声网直播间
  swcreateRoom(data) {
    return request({
      url: '/admin/ease/room/addRoom',
      method: 'post',
      data
    })
  },
  // 编辑声网直播间
  sweditRoom(data) {
    return request({
      url: '/admin/ease/room/editRoom',
      method: 'post',
      data
    })
  },
  // 获取声网直播间详情
  swdetailRoom(data) {
    return request({
      url: '/admin/ease/room/detailRoom',
      method: 'post',
      data
    })
  },
  // 删除声网直播间
  swremoveRoom(data) {
    return request({
      url: '/admin/ease/room/removeRoom',
      method: 'post',
      data
    })
  },
  // 复制声网直播间
  swcopyRoom(data) {
    return request({
      url: '/admin/ease/room/copyRoom',
      method: 'post',
      data
    })
  },
}

